<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT" />










<meta name="description" content="springboot blog项目二开（三）模仿这个项目，添加一些实用的功能">
<meta property="og:type" content="article">
<meta property="og:title" content="blog （三）后台登录与发布文章">
<meta property="og:url" content="http://example.com/2021/04/03/blog-%EF%BC%88%E4%B8%89%EF%BC%89%E5%90%8E%E5%8F%B0%E7%99%BB%E5%BD%95%E4%B8%8E%E5%8F%91%E5%B8%83%E6%96%87%E7%AB%A0/index.html">
<meta property="og:site_name" content="yyc&#39;s blog">
<meta property="og:description" content="springboot blog项目二开（三）模仿这个项目，添加一些实用的功能">
<meta property="og:locale">
<meta property="og:image" content="https://gitee.com/goatyyc/giteep-page-imgs/raw/master/imgs/20210403094147.png">
<meta property="article:published_time" content="2021-04-03T01:36:58.000Z">
<meta property="article:modified_time" content="2021-04-03T01:43:36.848Z">
<meta property="article:author" content="yyc">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://gitee.com/goatyyc/giteep-page-imgs/raw/master/imgs/20210403094147.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://example.com/2021/04/03/blog-（三）后台登录与发布文章/"/>





  <title>blog （三）后台登录与发布文章 | yyc's blog</title>
  








<meta name="generator" content="Hexo 5.3.0"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta custom-logo">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">yyc's blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">技术博客</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://example.com/2021/04/03/blog-%EF%BC%88%E4%B8%89%EF%BC%89%E5%90%8E%E5%8F%B0%E7%99%BB%E5%BD%95%E4%B8%8E%E5%8F%91%E5%B8%83%E6%96%87%E7%AB%A0/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="yyc's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">blog （三）后台登录与发布文章</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2021-04-03T09:36:58+08:00">
                2021-04-03
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/springboot/" itemprop="url" rel="index">
                    <span itemprop="name">springboot</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="springboot-blog项目二开（三）"><a href="#springboot-blog项目二开（三）" class="headerlink" title="springboot blog项目二开（三）"></a>springboot blog项目二开（三）</h1><p>模仿这个项目，添加一些实用的功能</p>
<a id="more"></a>



<h2 id="后台登录、发表文章功能"><a href="#后台登录、发表文章功能" class="headerlink" title="后台登录、发表文章功能"></a>后台登录、发表文章功能</h2><h3 id="1、数据库设计"><a href="#1、数据库设计" class="headerlink" title="1、数据库设计"></a>1、数据库设计</h3><p>实现后台运维端的功能：</p>
<p>登录、查询个人资料、发表文章、文章管理（改、删除）、分类标签的管理、文件管理（个人网盘）；增加个性化功能：个人留言板、</p>
<p>实现一个oj系统</p>
<p>数据表设计</p>
<p>user、article、comment、categories</p>
<h3 id="2、前端页面："><a href="#2、前端页面：" class="headerlink" title="2、前端页面："></a>2、前端页面：</h3><p>copy的项目的header.html</p>
<p><img src="https://gitee.com/goatyyc/giteep-page-imgs/raw/master/imgs/20210403094147.png"></p>
<p>坑：css文件无法加载出来，原来是一开始生成的classes中不带后来加入的静态资源文件，解决方法是maven clean一下，重新加载</p>
<h3 id="静态资源导入："><a href="#静态资源导入：" class="headerlink" title="静态资源导入："></a><strong>静态资源导入：</strong></h3><p>双击shift查找WebMvcAutoConfigurer类</p>
<p>类中找到</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">protected</span> <span class="keyword">void</span> <span class="title">addResourceHandlers</span><span class="params">(ResourceHandlerRegistry registry)</span> </span>&#123;</span><br><span class="line">            <span class="keyword">super</span>.addResourceHandlers(registry);</span><br><span class="line">            <span class="keyword">if</span> (!<span class="keyword">this</span>.resourceProperties.isAddMappings()) &#123;</span><br><span class="line">            	<span class="comment">// 自定义生效</span></span><br><span class="line">                logger.debug(<span class="string">&quot;Default resource handling disabled&quot;</span>);</span><br><span class="line">            &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">                ServletContext servletContext = <span class="keyword">this</span>.getServletContext();</span><br><span class="line">                <span class="comment">// 找静态资源方法1：webjars 下  映射</span></span><br><span class="line">                <span class="keyword">this</span>.addResourceHandler(registry, <span class="string">&quot;/webjars/**&quot;</span>, <span class="string">&quot;classpath:/META-INF/resources/webjars/&quot;</span>);</span><br><span class="line">                <span class="comment">// 方法2： /** 映射到 /public  /static ...</span></span><br><span class="line">                <span class="keyword">this</span>.addResourceHandler(registry, <span class="keyword">this</span>.mvcProperties.getStaticPathPattern(), (registration) -&gt; &#123;</span><br><span class="line">                    registration.addResourceLocations(<span class="keyword">this</span>.resourceProperties.getStaticLocations());</span><br><span class="line">                    <span class="keyword">if</span> (servletContext != <span class="keyword">null</span>) &#123;</span><br><span class="line">                        registration.addResourceLocations(<span class="keyword">new</span> Resource[]&#123;<span class="keyword">new</span> ServletContextResource(servletContext, <span class="string">&quot;/&quot;</span>)&#125;);</span><br><span class="line">                    &#125;</span><br><span class="line"></span><br><span class="line">                &#125;);</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br></pre></td></tr></table></figure>


<p>webjars：允许以maven方式引入第三方插件</p>
<h3 id="3、后台管理功能"><a href="#3、后台管理功能" class="headerlink" title="3、后台管理功能"></a>3、后台管理功能</h3><h4 id="（1）、管理员登录功能"><a href="#（1）、管理员登录功能" class="headerlink" title="（1）、管理员登录功能"></a>（1）、管理员登录功能</h4><p><strong>拦截器：</strong></p>
<p>自定义登录拦截器类实现HandlerInterceptor 重写preHandle</p>
<p>定义一个配置类实现webMvcConfigurer重写addInterceptor方法把拦截器注入addInterceptor</p>
<p>坑：注解@Configuration没加上，所以一直拦截失败</p>
<p><strong>登录功能：</strong></p>
<p>控制器：AUthController</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">   <span class="meta">@Autowired</span></span><br><span class="line">   <span class="keyword">private</span> UserService userService;    </span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="meta">@PostMapping(&quot;/login&quot;)</span></span><br><span class="line">   <span class="meta">@ResponseBody</span></span><br><span class="line">   <span class="function"><span class="keyword">public</span> APIResponse <span class="title">login</span><span class="params">(HttpServletRequest request, String username, String pwd)</span></span>&#123;</span><br><span class="line">       User userInfo = userService.login(username,pwd);</span><br><span class="line">       <span class="keyword">if</span>(<span class="keyword">null</span> == userInfo)&#123;</span><br><span class="line">           <span class="keyword">return</span> APIResponse.fail(<span class="string">&quot;no such user&quot;</span>);</span><br><span class="line">       &#125;</span><br><span class="line">       <span class="comment">// 登录成功</span></span><br><span class="line">       request.getSession().setAttribute(<span class="string">&quot;userId&quot;</span>,userInfo);</span><br><span class="line">       <span class="keyword">return</span> APIResponse.success();</span><br><span class="line">   &#125;</span><br></pre></td></tr></table></figure>
<p>服务层：</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">@Override</span></span><br><span class="line">   <span class="function"><span class="keyword">public</span> User <span class="title">login</span><span class="params">(String username, String pwd)</span> </span>&#123;</span><br><span class="line">       <span class="keyword">if</span>(!(StringUtils.hasLength(username) &amp;&amp; StringUtils.hasLength(pwd)))&#123;</span><br><span class="line">           <span class="keyword">return</span> <span class="keyword">null</span>;</span><br><span class="line">       &#125;</span><br><span class="line">       String password = MD5Utils.MD5encode(username + pwd);</span><br><span class="line">       User user = userMapper.getUserInfoByCond(username, password);</span><br><span class="line">       <span class="keyword">if</span>(<span class="keyword">null</span> == user)&#123;</span><br><span class="line">           <span class="keyword">return</span> <span class="keyword">null</span>;</span><br><span class="line">       &#125;</span><br><span class="line">       <span class="keyword">return</span> user;</span><br><span class="line">   &#125;</span><br></pre></td></tr></table></figure>
<p>userMapper：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">@Mapper</span><br><span class="line">public interface UserMapper &#123;</span><br><span class="line">    User getUserInfoByCond(@Param(&quot;username&quot;) String username, @Param(&quot;password&quot;) String pwd);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F;xml</span><br><span class="line">    &lt;sql id&#x3D;&quot;BASE_TABLE&quot;&gt;user&lt;&#x2F;sql&gt;</span><br><span class="line"></span><br><span class="line">    &lt;select id&#x3D;&quot;getUserInfoByCond&quot; resultType&#x3D;&quot;com.learn.site.pojo.User&quot; parameterType&#x3D;&quot;String&quot;&gt;</span><br><span class="line">        select * from user</span><br><span class="line">        &lt;where&gt;</span><br><span class="line">            &lt;if test&#x3D;&quot;username !&#x3D; null&quot;&gt;</span><br><span class="line">                and username &#x3D; #&#123;username, jdbcType&#x3D;VARCHAR&#125;</span><br><span class="line">            &lt;&#x2F;if&gt;</span><br><span class="line">            &lt;if test&#x3D;&quot;password !&#x3D; null&quot;&gt;</span><br><span class="line">                and password &#x3D; #&#123;password, jdbcType&#x3D;VARCHAR&#125;</span><br><span class="line">            &lt;&#x2F;if&gt;</span><br><span class="line">        &lt;&#x2F;where&gt;</span><br><span class="line">    &lt;&#x2F;select&gt;</span><br></pre></td></tr></table></figure>




<hr>
<h4 id="（2）、发表文章"><a href="#（2）、发表文章" class="headerlink" title="（2）、发表文章"></a>（2）、发表文章</h4><p><strong>前端：</strong></p>
<p>表单：标题、文章图片路径、内容、类型、状态（发表or草稿箱）、标签、分类、允许评论（开启）</p>
<p><strong>后台：</strong></p>
<p>控制器：</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 1、接收参数并存储到pojo对象中</span></span><br><span class="line"><span class="comment">// 2、service层添加文章（传入pojo对象）</span></span><br><span class="line"><span class="comment">// 3、返回成功</span></span><br><span class="line"></span><br><span class="line">    <span class="meta">@PostMapping(&quot;/publish&quot;)</span></span><br><span class="line">    <span class="meta">@ResponseBody</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> APIResponse <span class="title">publishArticle</span><span class="params">(</span></span></span><br><span class="line"><span class="function"><span class="params">            HttpServletRequest request,String title,String titlePic,</span></span></span><br><span class="line"><span class="function"><span class="params">            String slug,String content,String type,String status,</span></span></span><br><span class="line"><span class="function"><span class="params">            String tags,String categories, Boolean allowComment)</span></span>&#123;</span><br><span class="line"></span><br><span class="line">        Content contentObj = <span class="keyword">new</span> Content();</span><br><span class="line">        contentObj.setTitle(title);</span><br><span class="line">        contentObj.setTitlePic(titlePic);</span><br><span class="line"></span><br><span class="line">        contentObj.setContent(content);</span><br><span class="line">        contentObj.setType(type);</span><br><span class="line">        contentObj.setStatus(status);</span><br><span class="line">        <span class="comment">// 只允许博客文章有分类</span></span><br><span class="line">        contentObj.setCategories(type.equals(Types.ARTICLE.getType()) ? categories:<span class="keyword">null</span> );</span><br><span class="line">        contentObj.setAllowComment(allowComment ? <span class="number">1</span>:<span class="number">0</span>);</span><br><span class="line"></span><br><span class="line">        contentService.addArticle(contentObj);</span><br><span class="line"></span><br><span class="line">        <span class="keyword">return</span> APIResponse.success();</span><br><span class="line">    &#125;</span><br></pre></td></tr></table></figure>


<p>服务层：</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 接口</span></span><br><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">interface</span> <span class="title">ContentService</span> </span>&#123;</span><br><span class="line"></span><br><span class="line">    <span class="function"><span class="keyword">void</span> <span class="title">addArticle</span><span class="params">(Content content)</span></span>;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// impl</span></span><br><span class="line"><span class="meta">@Service</span></span><br><span class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">ContentServiceImpl</span> <span class="keyword">implements</span> <span class="title">ContentService</span> </span>&#123;</span><br><span class="line">    <span class="meta">@Autowired</span></span><br><span class="line">    <span class="keyword">private</span> ContentMapper contentMapper;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">    <span class="meta">@Override</span></span><br><span class="line">    <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">addArticle</span><span class="params">(Content content)</span> </span>&#123;</span><br><span class="line">        <span class="comment">// 校验参数是否为空</span></span><br><span class="line">        <span class="keyword">if</span>(<span class="keyword">null</span> == content)</span><br><span class="line">            <span class="keyword">throw</span> BusinessException.withErrorCode(ErrorConstant.Common.PARAM_IS_EMPTY);</span><br><span class="line">        <span class="keyword">if</span>(!StringUtils.hasLength(content.getTitle()))</span><br><span class="line">            <span class="keyword">throw</span> BusinessException.withErrorCode(ErrorConstant.Article.TITLE_CAN_NOT_EMPTY);</span><br><span class="line">        <span class="keyword">if</span>(!StringUtils.hasLength(content.getContent()))</span><br><span class="line">            <span class="keyword">throw</span> BusinessException.withErrorCode(ErrorConstant.Article.CONTENT_CAN_NOT_EMPTY);</span><br><span class="line"></span><br><span class="line">        <span class="comment">// 分类</span></span><br><span class="line">        String categories = content.getCategories();</span><br><span class="line"></span><br><span class="line">        contentMapper.addArticle(content);</span><br><span class="line">        <span class="keyword">int</span> cid = content.getCid();</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>


<p>这里的bug是cid无法获取到，不清楚逻辑是如何从数据库取到返回的新增对象的id</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2021/03/21/mybatis-%E7%BC%93%E5%AD%98/" rel="next" title="mybatis 缓存">
                <i class="fa fa-chevron-left"></i> mybatis 缓存
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2021/04/05/%E5%9B%9E%E6%BA%AF%E6%B3%95/" rel="prev" title="回溯法">
                回溯法 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/images/avatar.png"
                alt="" />
            
              <p class="site-author-name" itemprop="name"></p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
                <a href="/archives">
                  <span class="site-state-item-count">23</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">9</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#springboot-blog%E9%A1%B9%E7%9B%AE%E4%BA%8C%E5%BC%80%EF%BC%88%E4%B8%89%EF%BC%89"><span class="nav-text">springboot blog项目二开（三）</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%90%8E%E5%8F%B0%E7%99%BB%E5%BD%95%E3%80%81%E5%8F%91%E8%A1%A8%E6%96%87%E7%AB%A0%E5%8A%9F%E8%83%BD"><span class="nav-text">后台登录、发表文章功能</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1%E3%80%81%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1"><span class="nav-text">1、数据库设计</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2%E3%80%81%E5%89%8D%E7%AB%AF%E9%A1%B5%E9%9D%A2%EF%BC%9A"><span class="nav-text">2、前端页面：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E9%9D%99%E6%80%81%E8%B5%84%E6%BA%90%E5%AF%BC%E5%85%A5%EF%BC%9A"><span class="nav-text">静态资源导入：</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3%E3%80%81%E5%90%8E%E5%8F%B0%E7%AE%A1%E7%90%86%E5%8A%9F%E8%83%BD"><span class="nav-text">3、后台管理功能</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%EF%BC%881%EF%BC%89%E3%80%81%E7%AE%A1%E7%90%86%E5%91%98%E7%99%BB%E5%BD%95%E5%8A%9F%E8%83%BD"><span class="nav-text">（1）、管理员登录功能</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%EF%BC%882%EF%BC%89%E3%80%81%E5%8F%91%E8%A1%A8%E6%96%87%E7%AB%A0"><span class="nav-text">（2）、发表文章</span></a></li></ol></li></ol></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">yyc</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
